PROJECT (XPMRDF)

#Rules for version:
#MAJOR and MINOR versions are purely political (tracks JLucene compatibility)
#REVISION version MUST be revised if the headers or compatibility change
#PATCH should be 0 unless a patch is made that doesn't affect the public signature (i.e. clients don't need to re-compile).
SET(XPMDOC_VERSION_MAJOR "2")
SET(XPMDOC_VERSION_MINOR "3")
SET(XPMDOC_VERSION_REVISION "3")
SET(XPMDOC_VERSION_PATCH "4")

# SOVERSION information
#Must be incremented for releases if the api is not backwards compatible
SET(XPMDOC_SOVERSION "1")

MATH(EXPR XPMDOC_INT_VERSION "(${XPMDOC_VERSION_MAJOR} * 1000000) + (${XPMDOC_VERSION_MINOR} * 10000) + (${XPMDOC_VERSION_REVISION} * 100) + (${XPMDOC_VERSION_PATCH} * 1)" )
SET(XPMDOC_VERSION "${XPMDOC_VERSION_MAJOR}.${XPMDOC_VERSION_MINOR}.${XPMDOC_VERSION_REVISION}.${XPMDOC_VERSION_PATCH}")

#CMake 2.6+ is recommended to an improved Boost module
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR)

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
  cmake_policy(SET CMP0015 NEW)
endif(COMMAND cmake_policy)

#set various platform specific global options
if(WIN32)
 set(CMAKE_DEBUG_POSTFIX "d")
endif(WIN32)

#set characters set as unicode
add_definitions(-DUNICODE -D_UNICODE)

# include specific modules
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#define options...

#Single output directory for building all executables and libraries.
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Executable Output Directory" FORCE)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Library Output Directory" FORCE)

#add tests
#ENABLE_TESTING()
#ADD_TEST(SimpleTest ${EXECUTABLE_OUTPUT_PATH}/XPMDOC_test )

#set boost path. we need src/ext to be defined before this works...
#Include (XPMDOCBoost)
#GET_BOOST_INCLUDE_PATH(_CL_BOOST_INCLUDE_PATH)
#INCLUDE_DIRECTORIES( ${_CL_BOOST_INCLUDE_PATH} )

# add clucene libraries
#SET(clucene ../libs/clucene-core-2.3.3.4/src/core
#            ../libs/clucene-core-2.3.3.4/src/shared)
#INCLUDE_DIRECTORIES( ${clucene})
# add conex model
SET(conex-model ../../conex-google/conex/src/model)
SET(conex-control ../../conex-google/conex/src/control)
SET(conex-gui ../../conex-google/conex/src/gui)
SET(ternary-tree ../../conex-google/conex/src/ternary_tree)
INCLUDE_DIRECTORIES( ${conex-model} ${conex-control} ${conex-gui} ${ternary-tree})

 ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)

# Link libraries

#include the projects
#ADD_SUBDIRECTORY (src/util)
ADD_SUBDIRECTORY (src/model)
ADD_SUBDIRECTORY (src/dal)
ADD_SUBDIRECTORY (src/control)
#ADD_SUBDIRECTORY (src/ternary_tree)
ADD_SUBDIRECTORY (src/app)
ADD_SUBDIRECTORY (src/gui)
#ADD_SUBDIRECTORY (src/preprocess)
#ADD_SUBDIRECTORY (src/matlab)
